import 'package:base_plugin/base_plugin.dart';
import 'package:finance_app/generated/a.dart';
import 'package:finance_app/src/common/app_colors.dart';
import 'package:finance_app/src/common/app_spaces.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

class ChooseButton extends StatelessWidget {
  final String text;
  final VoidCallback onTap;

  const ChooseButton({Key key, this.text, this.onTap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: getDp(34)),
      child: PressedOpacityButton(
        onPressed: onTap,
        color: Colors.white,
        borderRadius: BorderRadius.circular(getSp(30)),
        boxShadow: [
          BoxShadow(
            color: Colors.black.withOpacity(0.25),
            blurRadius: getDp(20),
            offset: Offset(0, getDp(4)),
            spreadRadius: -getDp(5),
          )
        ],
        child: Container(
          width: getDp(307),
          height: getDp(96),
          alignment: Alignment.center,
          child: Stack(
            children: [
              Center(
                child: Text(
                  text,
                  style: TextStyle(
                    color: aceBlackColor,
                    fontWeight: FontWeight.bold,
                    fontSize: getSp(20),
                  ),
                ),
              ),
              Align(
                alignment: Alignment.centerRight,
                child: Padding(
                  padding: EdgeInsets.only(right: getDp(28)),
                  child: SvgPicture.asset(
                    A.assetsImagesRight,
                    width: getDp(20),
                    height: getDp(29),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
